package com.platform.comm.dto;

import lombok.Getter;

import java.io.Serializable;

/**
 * @author liujizheng
 * @version 1.0
 * @ClassName Kv
 * @Description kv组件
 * @date 2021/10/14 11:33
 */
@Getter
public class Kv<K, V> implements Serializable {
    private final K key;
    private final V value;
    private Kv(K key, V value) {
        this.key = key;
        this.value = value;
    }

    public static <K, V> Kv<K, V> of(K key, V value) {
        return new Kv<>(key, value);
    }
}
